package com.ruoyi.web.controller.information;

import com.jianqiao.information.comment.domain.CommentEntity;
import com.jianqiao.information.comment.service.CommentService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * author: cyx
 * create: 2024/7/18 9:23
 **/
@RestController
@RequestMapping("/information/comment")
public class CommentController {

    @Autowired
    private CommentService commentServiceImpl;

    @PostMapping("/add")
    public AjaxResult addComment(@RequestBody CommentEntity commentEntity){
        int insertCount = commentServiceImpl.addComment(commentEntity);
        return AjaxResult.success(insertCount);
    }
}
